package com.eber.demo.design.adapter;

public class AdapterClass {
    public static void main(String[] args) {
        /*Adaptee adaptee = new Adaptee();
        adaptee.doSomething();*/
        Target target = new Adapter();
        target.request();
    }

    private static class Adaptee {
        public void doSomething() {
            System.out.println("我做了一件事情...");
        }
    }

    private interface Target {
        void request();
    }

    private static class Adapter extends Adaptee implements Target {
        @Override
        public void request() {
            System.out.println("适配处理...");
            super.doSomething();
        }
    }
}
